Exploiting Logic Program Schemata to Teach Recursive Programming

نویسنده

  • Timothy S. Gegg-Harrison
چکیده

Recursion is a complex concept that most novice logic programmers have difficulty grasping. Problems associated with recursion are avoided in imperative languages where iteration is provided as an alternative to recursion. Although difficult to learn, recursion is very easy to use once it is understood. In fact, many problems that have straightforward recursive solutions have very sophisticated iterative solutions. Many of the difficulties associated with learning recursion can be overcome by incorporating conditional recursion (i.e., a structured recursive equivalent to the WHILE loop) into logic programming languages. Two popular instructional techniques are collaborative learning and situated learning. The underlying claim of the situated cognition movement is the desire to enculturate the student into the domain of the teacher by involving the student in a series of authentic activities which are designed to incrementally improve the skills of the student. In the domain of computer programming, collaboration is an authentic activity. In this paper, we present logic program templates and schemata which add conditional recursion to logic programming languages and enable collaborative logic programming. Conditional recursion also provides a bridge to higher-order programming. Higher-order programming is the essence of abstraction in problem solving. Thus, in addition to aiding its students in acquiring the knowledge of recursion, conditional recursion also promotes abstract problem solving skills. We have successfully employed this schema-based approach to teaching recursion in several declarative programming languages with much success over the past four years.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Extensible Logic Program Schemata

Schema-based transformational systems maintain a library of logic program schemata which capture large classes of logic programs. One of the shortcomings of schema-based transformation approaches is their reliance on a large (possibly incomplete) set of logic program schemata that is required in order to capture all of the minor syntactic differences between semantically similar logic programs....

متن کامل

Transformational Development of Logic Programs from Executable Specifications

In our method – that we call Visual and Textual Composition of Logic Programs – we have enhanced the schema-based construction of logic programs in two ways intended to bridge the conceptual gap between application domains and the programming domain. First, we define visual and textual views of programs that can be used to construct programs in application-specific concepts, and which can be un...

متن کامل

Theorem Proving Techniques and P-functions for Logic Design and Logic Programming

It is shown that theorem proving methods can lead to program synthesis and algorithm implementation by using pairs of logic laws: a deductive law for proving the theorem and a constructive law for synthesizing the program or algorithm. The construction of program schemata in an algorithmic programming environment and logic programming in a declarative programming environment appear as two parti...

متن کامل

Approximating Constraint Propagation in Datalog

We present a technique exploiting Datalog with aggregates to improve the performance of programs with arithmetic (in)equalities. Our approach employs a source-to-source program transformation which approximates the propagation technique from Constraint Programming. The experimental evaluation of the approach shows good run time speedups on a range of non-recursive as well as recursive programs....

متن کامل

An Adaptive Web-Based System for Learning Programming

This paper presents an approach to learning programming by novice programmers through a web-based adaptive educational system called ALEA (Adaptive LEArning). ALEA supports learning programming by generating sequences of program examples that serve as exercises for a learner. The sequence is adapted to the needs of individual learners. At present, ALEA contains more than a hundred Lisp and Prol...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006